package auditenergetic;
//import com.sun.org.apache.xerces.internal.parsers.SAXParser;
//import org.xml.sax.SAXException;
//import org.xml.sax.SAXParseException;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
import java.io.*;

public class Main {

   
    public void list( ) throws Exception
    {
        XMLReader parser = XMLReaderFactory.createXMLReader("com.sun.org.apache.xerces.internal.parsers.SAXParser");
        XMLReader parser2 = XMLReaderFactory.createXMLReader("com.sun.org.apache.xerces.internal.parsers.SAXParser");
        XMLReader parser3 = XMLReaderFactory.createXMLReader("com.sun.org.apache.xerces.internal.parsers.SAXParser");
        XMLReader parser4 = XMLReaderFactory.createXMLReader("com.sun.org.apache.xerces.internal.parsers.SAXParser");
        XMLReader parser5 = XMLReaderFactory.createXMLReader("com.sun.org.apache.xerces.internal.parsers.SAXParser");
        parser.setContentHandler(new Handler_Cladiri( ));
        parser2.setContentHandler(new Date_Cladire());
        parser3.setContentHandler(new Date_Beneficiar());
        parser4.setContentHandler(new CEPACC());
        parser5.setContentHandler(new Calcul_AporturiCaldura());
        parser.parse("xml/Cladire.xml");
        System.out.println("--------------------------------------------------");
        parser2.parse("xml/Date_Cladire.xml");
        System.out.println("--------------------------------------------------");
        //parser3.parse("xml/Date_Beneficiar.xml");
        System.out.println("--------------------------------------------------");
        parser4.parse("xml/Date_preparare_apa_calda.xml");
        parser5.parse("xml/Calcul_AporturiCaldura.xml");

    }

    public static void main(String[] args) throws Exception
    {
        new Main().list( );
        CEPACC ce = new CEPACC();
        NCIC nc = new NCIC();
        System.out.printf("CONSUMUL NECESAR DE ENERGIE PENTRU PREPARAREA APEI CALDE DE CONSUM"
                + "ESTE %.2f\n",ce.ComputeQ_acm());
        System.out.printf("CONSUMUL NECESAR DE ENERGIE PENTRU INCALZIRE ESTE "
                + "%.2f\n",nc.Compute_Qh());
        System.out.println("Calculul aporturilor de caldura: "+Calcul_AporturiCaldura.Compute());
    }
}
